<html>
<head>
<link href="../../../Objects/sofa_white.css" rel="stylesheet" type="text/css" />
</head>
<body>
	<div id="contenu">
		
		<center><h3>Creation of a Scene (4/9)</h3></center>
		<center><img src="3_FullObject.png" width="300" name="FullObject" align="middle"></center>
		
		<br><div id="orangeText">Description</div>
        
		<p>Now that we have a topology, a mechanical object well initialized, it is time to simulate the deformation of the object. To do so, we add a <strong>ForceField</strong> to the scene.</p>
		<p>You have to choose a ForceField that is compatible with your <strong>MechanicalObject</strong>. In order to be compatible, the two must use the same <strong>template</strong>.</p>
        
        <p><div id="tutorialAction">Find the <strong>MechanicalObject</strong> component using the <strong>Filter</strong>.</div></p>
        
        <p>Notice that beside <strong>MechanicalObject</strong> is a dropdown menu with <strong>Vec3d</strong> selected.</p>
        
        <p><div id="tutorialAction">Click the dropdown menu to see the other possible selections.</div></p>
        
        <p>You will see choices such as <strong>Rigid</strong> and <strong>Vec2f</strong>. These are possible templates. Since we didn't concern ourselves with the template when we added the <strong>MechanicalObject</strong> to our scene, our <strong>MechanicalObject</strong> uses the default template, <strong>Vec3d</strong>. This means we won't be able to add <strong>ForceFields</strong> using <strong>Rigid</strong> types, for example. Some <strong>ForceFields</strong> rely on a given topology. Most of the time, their name informs you about the topology the are relying on.</p>
        
        
        <p>We can see that the <strong>SparceGridTopology</strong> makes a grid of particles. If these particles were joined by lines going down the rows and columns of these particles, they would become cubes. Cubes have six faces, and are therefore hexahedral. This means that we can use all <strong>Hexadedron</strong> based <strong>ForceFields</strong> with the <strong>SpaceGridTopology</strong>.</p>  
                
		<div id="orangeText">Key points</div>
        
        <p> We chose to model our deformation using Finite Elements: <b>HexahedronFEMForceField</b>.</p>
        
        <p><div id="tutorialAction">Find and add the <strong>HexahedronFEMForceField</strong> to the <strong>Object</strong> node. Go to the <strong>Properties 2/2</strong> tab, and change the <strong>Young's Modulus</strong> from <strong>5000</strong> to "200".</div></p>

		<br><div id="orangeText">Results</div>

        <p><div id="tutorialAction">Run in SOFA. To get a better view of the animation, change the <strong>DT</strong> from <strong>0.02</strong> to "0.001", and animate.</div></p>
	
		<p>Now you should see the hexahedra corresponding to the Finite Elements. When you animate, you will be able to see the deformation of the cells of the grid.</p>

		<div id="orangeText">Related</div>
                <p>Modify the young modulus of the FEM force field: the higher, the stiffer will be the model. </p>
                <p>Modify the poisson ratio (between 0 and 0.5).</p>

                <br><center><h3><a href="2_FullObject.scn">Previous</a> ____________  <a href="4_FullObject.scn">Next</a></center></h3>
	</div>
</body>
</html>
